package spring;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

import baseTest.BaseTest;

public class SpringApplicationContext extends BaseTest{
	@Autowired
	private ApplicationContext appContext;
	
	@Test
	public void t1() throws InterruptedException{
		//ApplicationContext appContext=new FileSystemXmlApplicationContext();
		System.out.println(appContext.getDisplayName()+"DisplayName");
		System.out.println(appContext.getId()+"id");
		System.out.println(appContext.getApplicationName()+"ApplicationName");
		String[] strs=appContext.getBeanDefinitionNames();
		Thread.sleep(2000);
		System.out.println("start");
		for (String string : strs) {
			System.out.println(string);
		}
		System.out.println("end");
	}
}
